describe("getCustomErrorMessage", function() {

    it("getCustomErrorMessage test",function(){
        var e = BreezeException.create();
        spyOn(e,'getErrorMessage');
        e.getCustomErrorMessage(App.i18n.translations.en.error);
        expect(e.getErrorMessage).toHaveBeenCalled();
    });

    it("error message not defined",function(){
        var e= BreezeException.create({errorCode: 'ERR_CODE', errorMessage: undefined});
        spyOn(e,'getErrorMessage');
        e.getCustomErrorMessage(App.i18n.translations.en.error);
    });

    it("error message length is zero",function(){
        var e= BreezeException.create({errorCode: 'ERR_CODE', errorMessage: ''});
        spyOn(e,'getErrorMessage');
        e.getCustomErrorMessage(App.i18n.translations.en.error);
    });

    it("error message returned",function(){
        var e= BreezeException.create({errorCode: 'ERR_CODE', errorMessage: 'someMessage'});
        spyOn(e,'getErrorMessage').andReturn("someMessage");
        e.getCustomErrorMessage(App.i18n.translations.en.error);
    });
});